package com.train.mvc.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author hugx
 * @create 2021-01-16 9:35
 */
@Service
public class DemoService {
    @Autowired
    private PayStrategy  aliPayStrategy;

    @Autowired
    private PayStrategy  jdPayStrategy;

    @Autowired
    private PayStrategy  weixinPayStrategy;

    public String jdPay(String msg){
        return jdPayStrategy.pay(msg);
    }

    public String aliPay(String msg){
        return aliPayStrategy.pay(msg);
    }

    public String weiXinPay(String msg){
        return weixinPayStrategy.pay(msg);
    }
}
